| Clients
Remark:
<%'列表显示
const MaxPerPage=9 '分页显示的纪录个擿
dim sqlD
dim rsd
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
set rsd=server.createobject("adodb.recordset")
%>
<% sqlD="select * from book"' order by id desc
rsd.open sqlD,conn,1,1
if rsd.eof and rsd.bof then
response.write " No any client Remark! "
else
totalPut=rsd.recordcount
totalPut=rsd.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
'showpages
else
if (currentPage-1)*MaxPerPage
<%
do while not (rsd.eof or err)
%>
|
<%=rsd("content")%>
|
|
<%=rsd("name")%>
|
|
<%=rsd("time")%>
|
<% i=i+1
if i>=MaxPerPage then exit do
rsd.movenext
loop
%>
|
<%showpages%>
|
<%
end sub
sub showpages()
dim n
if (totalPut mod MaxPerPage)=0 then
n= totalPut \ MaxPerPage
else
n= totalPut \ MaxPerPage + 1
end if
if n="" then
response.write ">> Page "
response.write "1"
response.write " "
exit sub
end if
dim k
response.write ">> Page "
for k=1 to n
if k=currentPage then
response.write "["+Cstr(k)+"] "
else
response.write "["+""+Cstr(k)+"] "
end if
next
response.write " "
end sub
''列表显示end
%>
|